package com.ff.discounts.component.saleorder

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import com.ff.discounts.adapter.BaseFragmentStateAdapter

/**
 *
 * @author: fufang
 * @date: 2023/11/2
 */
class SaleOrderPageAdapter(fragmentActivity: FragmentActivity):BaseFragmentStateAdapter<Int>(fragmentActivity) {
    override fun createFragment(position: Int): Fragment {
        return when (position) {
            1 -> OrderPageFragment.newInstance()
            else -> OrderSaleFragment.newInstance(getData(position))
        }
    }
}